#!/usr/bin/expect

set password [lindex $argv 1]  
set hostname [lindex $argv 0]  

set timeout 20
spawn ssh-copy-id $hostname -p 99
expect "*assword*"
send "$password\r"
expect eof
